// ----------------------------------------------------------------------------------
// Microsoft Developer & Platform Evangelism
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
// ----------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
// ----------------------------------------------------------------------------------

using System;
using System.ServiceModel;

namespace SL.IdentityModel.Services
{
    /// <summary>
    /// Class contains information to make WCF service call in ClaimsIdentitySessionManager
    /// </summary>
    internal class ServiceCallState
    {
        private Action _action;
        private string _appliesTo;
        private IClientChannel _channel;

        /// <summary>
        /// delegate containing service call
        /// </summary>
        internal Action Action
        {
            get { return _action; }
        }

        /// <summary>
        /// AppliesTo of target service, used fo 
        /// </summary>
        internal string AppliesTo
        {
            get { return _appliesTo; }
            set { _appliesTo = value; }
        }

        /// <summary>
        /// service call channel, used to set message header
        /// </summary>
        internal IClientChannel Channel
        {
            get { return _channel; }
        }

        /// <summary>
        /// creates a new instance of the class
        /// </summary>
        /// <param name="action"></param>
        /// <param name="channel"></param>
        /// <param name="appliesTo"></param>
        internal ServiceCallState( Action action, IClientChannel channel, string appliesTo )
        {
            _action = action;
            _appliesTo = appliesTo;
            _channel = channel;
        }
    }
}